[mirrors]
http://www.kernel.org/pub/linux/kernel/people/mason/btrfs-progs/btrfs-progs-v3.16.tar.xz
https://www.kernel.org/pub/linux/kernel/people/mason/btrfs-progs/btrfs-progs-v3.16.tar.xz
http://ftp.free.fr/pub/linux/kernel/people/mason/btrfs-progs/btrfs-progs-v3.16.tar.xz

[vars]
filesize=290544
sha512=dd1f4bc13e62623792121d0f2a2a388be85bae4eec4abc348e0d21949fefa58863e7bf56515dd57022c312ee02d2fa76cc7b1a1c2d78a36532961b22b410a4db


[deps]
lzo
zlib
acl
e2fsprogs
bash
sparse
libuuid
attr
libblkid

[build]
patch -p1 < "$K"/btrfs-progs.patch
make prefix="$butch_prefix" DESTDIR="$butch_install_dir"\
     CFLAGS="-DXATTR_NAME_MAX=255 -DXATTR_LIST_MAX=65536 \
     -DXATTR_SIZE_MAX=65536 -DPATH_MAX=4096 $optcflags" \
     LDFLAGS="$optldflags" -j$MAKE_THREADS install

make prefix="$butch_prefix" CFLAGS="-DXATTR_NAME_MAX=255 \
       -DXATTR_LIST_MAX=65536 -DXATTR_SIZE_MAX=65536 \
       -DPATH_MAX=4096 $optcflags" \
     LDFLAGS="$optldflags" -j$MAKE_THREADS static

make prefix="$butch_prefix" install
install -D -m 755 btrfs.static "$butch_install_dir"/"$butch_prefix"/bin/btrfs.static
install -D -m 755 mkfs.btrfs.static "$butch_install_dir"/"$butch_prefix"/bin/mkfs.btrfs.static

make prefix="$butch_prefix" CFLAGS="-DXATTR_NAME_MAX=255 \
       -DXATTR_LIST_MAX=65536 -DXATTR_SIZE_MAX=65536 \
       -DPATH_MAX=4096 $optcflags" \
     LDFLAGS="$optldflags" -j$MAKE_THREADS btrfs-zero-log.static

install -D -m 755 btrfs-zero-log.static "$butch_install_dir"/"$butch_prefix"/bin/btrfs-zero-log.static
